package classes;

import java.awt.Color;
import java.util.Random;

public class Ball {
	private int radius;
	private Color color;
	private int posX;
	private int posY;
	private int speedX;
	private int speedY;
	public Ball(int radius, Color color, int posX, int posY) {
		super();
		this.radius=radius;
		this.color = color;
		this.posX = posX;
		this.posY = posY;
		Random random = new Random();
		speedX= random.nextInt()%4;
		speedY= random.nextInt()%2;
		
	}
	public Ball(int radius, Color color, int posX, int posY, int speedX,
			int speedY) {
		super();
		this.radius = radius;
		this.color = color;
		this.posX = posX;
		this.posY = posY;
		this.speedX = speedX;
		this.speedY = speedY;
	}
	/**
	 * @return the speedX
	 */
	public int getSpeedX() {
		return speedX;
	}
	/**
	 * @param speedX the speedX to set
	 */
	public void setSpeedX(int speedX) {
		this.speedX = speedX;
	}
	/**
	 * @return the speedY
	 */
	public int getSpeedY() {
		return speedY;
	}
	/**
	 * @param speedY the speedY to set
	 */
	public void setSpeedY(int speedY) {
		this.speedY = speedY;
	}
	/**
	 * @return the width
	 */
	public int getRadius() {
		return radius;
	}
	
	/**
	 * @param radius the radius to set
	 */
	public void setRadius(int radius) {
		this.radius = radius;
	}
	/**
	 * @return the color
	 */
	public Color getColor() {
		return color;
	}
	/**
	 * @param color the color to set
	 */
	public void setColor(Color color) {
		this.color = color;
	}
	/**
	 * @return the posX
	 */
	public int getPosX() {
		return posX;
	}
	/**
	 * @param posX the posX to set
	 */
	public void setPosX(int posX) {
		this.posX = posX;
	}
	/**
	 * @return the posY
	 */
	public int getPosY() {
		return posY;
	}
	/**
	 * @param posY the posY to set
	 */
	public void setPosY(int posY) {
		this.posY = posY;
	}
	
	public void move (){
		posX+=speedX;
		posY+=speedY;
	}
	
	
}
